Skip to content

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Sep 30, 2025

Issue # (if applicable)

N/A

Reason for this change

The ServerlessCache class was missing the CacheEngine.REDIS_7 case in the switch statement that determines the default port for imported caches.

So importing a Redis 7 serverless cache causes an error:

ValidationError: Unsupported cache engine: redis_7

Description of changes

  • Added missing CacheEngine.REDIS_7 case** in the fromServerlessCacheAttributes method's switch statement to ensure Redis 7 caches use the correct default port.
  • Add unit tests for all supported versions.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Add unit tests

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Sep 30, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team September 30, 2025 10:37
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Sep 30, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@mazyu36
Copy link
Contributor Author

mazyu36 commented Sep 30, 2025

Exemption request: Since no errors occur in unit tests, this is sufficient as a verification of the correction points.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 30, 2025
@mazyu36 mazyu36 changed the title fix(elasticache): cannot import Redis 7 Serverless Cache fix(elasticache): cannot import Redis 7 serverless cache Oct 3, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Oct 3, 2025
@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Oct 14, 2025
@go-to-k
Copy link
Contributor

go-to-k commented Oct 14, 2025

Thanks for the nice PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants